﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Somnus.Core.SceneManager;
using FarseerPhysics;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Factories;
using FarseerPhysics.Collision;
using Somnus.Utils;
using Somnus.Objects;
using Somnus.Core;

namespace Somnus.Objects.GameObjects.LevelObjects
{
    class Platform : PhysicsObject
    {
        /// <summary>
        /// Valor entre 0 e 1 que representa a fricção do chão
        /// 0 = deslizar sem fim
        /// 1= não conseguir sair do chão
        /// </summary>
        private float _friction = 0.6f;

        public Platform(DreamWorld world, String name, Texture2D texture, Nullable<Rectangle> sourceRectangle, float depth, Boolean isStatic, float x, float y, float width, float height, float rotation)
            : base(world, name, texture, sourceRectangle, depth, isStatic, x, y, width, height, rotation)
        {
        }

        public float Friction
        {
            get
            {
                return _friction;
            }
            set
            {
                _friction = MathHelper.Clamp(value, 0, 1);
            }
        }

    }
}
